<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>THẾ GIỚI LINH KIỆN MÁY TÍNH-XUÂN TUẤN</title>
<style type="text/css">
<!--
.style2 {
	font-family: "Courier New", Courier, monospace;
	font-size: 24px;
}
-->
</style>
</head>

<body>

<form id="form1" name="form1" method="post" action="dangkykh1.php">
<?php
$conn=mysql_connect("localhost","root","");
mysql_select_db("linhkienmt",$conn);
$sql ="select * from khachhang";
$result =mysql_query($sql,$conn);
$n= mysql_num_rows($result);
$n=$n+1;
$l=strlen($n);
$ma=$n;
for ($i=0;$i<10-$l;$i++)
     $ma="0".$ma;
?>	 
  <table background="img/anhnen/343.jpg" width="539" border="1" align="center" cellpadding="2">
    <tr>
      <td colspan="2" bgcolor="#99CCFF"><h2 align="center">PHẦN ĐĂNG KÝ THÔNG TIN KHÁCH HÀNG</h2></td>
    </tr>
    <tr  align="left">
      <td width="186">Mã khách hàng </td>
      <td width="390"><label>
        <input name="makh" type="text" id="makh" size="30" value="<?php echo $ma; ?>" readonly="yes"/>
      </label></td>
    </tr>
    <tr align="left">
      <td>Số chứng minh thư nhân dân </td>
      <td><label>
        <input name="cmnd" type="text" id="cmnd" size="30" />
      </label></td>
    </tr>
    <tr align="left">
      <td>Họ tên khách hàng </td>
      <td><label>
        <input name="tenkh" type="text" id="tenkh" size="30" />
      </label></td>
    </tr>
        <tr align="left">
      <td>Đia chỉ</td>
      <td><label>
        <input name="diachi" type="text" id="diachi" size="30" />
      </label></td>
    </tr>
	<tr align="left">
      <td>Email</td>
      <td><label>
        <input name="email" type="text" id="email" size="30" />
      </label></td>
    </tr>
	<tr align="left">
      <td>Số điện thoại liên lạc</td>
      <td><label>
        <input name="sdt" type="text" id="sdt" size="30" />
      </label></td>
    </tr>
	<tr align="left">
      <td>Số tài khoản</td>
      <td><label>
        <input name="stk" type="text" id="stk" size="30" />
      </label></td>
    </tr>
    <tr>
      <td colspan="2"><label>
        <div align="center">
          <input type="submit" name="Submit" value="Đăng ký" />
		  <input type="reset" value="Xoá">
        </div>
      </label></td>
    </tr>
  </table>
</form>

</body>
</html>
